//------------------------------------------------------------------------------
// <copyright file="RpcSocketTransportMessage.h" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

#pragma once

namespace Microsoft { namespace Internal { namespace GamesTest { namespace Rpc { namespace Server
{
	struct RpcSocketTransportMessage
	{
		GUID serverId;
		std::wstring version;
		HRESULT errorCode;
		std::wstring rpcMessage;

		/// <summary>
		/// Parse a string into the given object.
		/// </summary>
		GAMESTEST_ANNOTATE_HRESULT_METHOD static HRESULT Parse(std::wstring data, RpcSocketTransportMessage* result);

		/// <summary>
		/// Serialize this object into the provided string.
		/// </summary>
		/// <param name="serializedData">The string into which the serialized data should be stored.</param>
		GAMESTEST_ANNOTATE_HRESULT_METHOD HRESULT Serialize(std::wstring& serializedData);
	};

}}}}}